<?php 
require_once 'Image.php';
require_once 'Database.php';
require_once 'News.php';
$db=new DB();
$imageArr = $db->allHeaderImages();
$newsArr = $db->allHeaderNews();
?>

	<div id="sliding">
		<div id="banner">
	        <div id="coin-slider">
	        <?php  
	        	$n=count($imageArr);
	        	for ($i=0;$i<$n;$i++){
	        		echo "<img src='images/gallery/".$imageArr[$i]->getName()."' width ='1000' height='556' />";
	        	};
	        	 
	        ?>
	        </div>
	 	 </div>
	</div>
	<div id="page">
			<div class="post">
				<?php 					
					echo "<h2 class='title'><a href='#'>".$newsArr[0]->getName()."</a></h2>";
					echo "<div class='entry'>";
					echo "<p><img src='images/gallery/".$newsArr[0]->getImage()."'width='300' height='150' alt='' align='left'>";
					echo $newsArr[0]->getText()."</p><BR CLEAR='ALL'/><br/>";
					echo "<p class='button'><a href='#'>Read More</a></p>";
					echo "</div>";
				?>
			</div>
	</div>
	<div id="featured-content">		
			<?php 
				$n=count($newsArr);
				for ($i=1;$i<$n;$i++){
					if ($i %3 == 0) {
						echo "<div id='column3'>";
					} else {
						echo "<div id='column".($i%3)."'>";
					};
					echo "<h3>".$newsArr[$i]->getName()."</h3>";
					echo "<p><img src='images/gallery/".$newsArr[$i]->getImage()."'width='300' height='150' alt=''></p>";
					echo "<p>".$newsArr[$i]->getText()."</p>";
					echo "<p class='button'><a href='#'>Read More</a></p>";
					echo "</div>";
				}

			?>
	</div>

	</div>


